<html>
<head>
    <title>code/wrapper/SimplestFlashVarTestWrapper.html</title>
    <script type="text/javascript" src="../js/jquery-1.8.2.min.js"></script>
    <script>
        function refresh()
        {
            document['mySwf'].passSelection(window.top.getPlantFromChild());
        }
        function doneFromAS(str)
        {
            alert(str);
            $.ajax({
                type: "GET",
                url: "../data/get_compare_data.xml",
                dataType: "xml",
                success: function(xml) {
                    document['mySwf'].passXML(xmlToString(xml));
                    refresh();
                }
            });
        }

        function xmlToString(xmlData)
        {
            var xmlString;
            //IE
            if (window.ActiveXObject){
                xmlString = xmlData.xml;
            }
            // code for Mozilla, Firefox, Opera, etc.
            else{
                xmlString = (new XMLSerializer()).serializeToString(xmlData[0]);
            }
            return xmlString;
        }
    </script>
</head>
<body scroll='no'>
    <object id='mySwf' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' height='100%' width='100%'>
        <param name='src' value='Main.swf'/>
        <param name='flashVars' value='myName=Nick'/>
        <embed name='mySwf' src='Main.swf' height='100%' width='100%' flashVars='myName=Nick'/>
    </object>
</body>
</html>